<%@page import="org.apache.jasper.tagplugins.jstl.core.Catch"%>
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="java.sql.*"%>
<jsp:useBean id="connection" scope="page" class="com.wy.JDBConnection"/>
<html>
<head></head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="CSS/style.css">
<title></title>
<Script language="javascript">
function check1()
{
if(form_u.name.value=="")
{
alert("请添入姓名");
form_u.name.focus();
return false;
}
if(form_u.password.value=="")
{
alert("请添入密码");
form_u.password.focus();
return false;
}
}
</Script>

<body  link="#669900" alink="#FFCC66" vlink="#FF3300">
<%!ResultSet rs1 =null,goodrs = null;
String sql,goodsql,placardsql,esql,login,username,pow;
int code ,gcode;
%>
<jsp:include page="top.jsp"/>
<table width="786" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="202" height="255" valign="top" background="image/8.jpg">	
	
	<jsp:include page="left.jsp" flush="true" /></td>
    <td width="484" valign="top"><table width="100" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="image/13.jpg" width="370" height="39"></td>
      </tr>
    </table>
      <table width="370"  border="0" cellpadding="0" cellspacing="0" background="image/14.jpg">
        <tr>
          <td valign="top">
		  
		  <table width="370" border="0" cellpadding="0" cellspacing="0">
		  <%goodsql ="select id,goodsstyle,goodsname,starprovince,"+
				 " startcity,endprovince,endcity,style,username ,issuedate"+
				"  from tb_goodsmeg "+
				 " order by issuedate desc"+
				 " limit 8;";
				try{
				rs1 = connection.executeQuery(goodsql);
				while (rs1.next()){
					gcode = rs1.getInt("id");
				
            %>
            <tr>
              <td width="36" height="25">&nbsp;</td>
              <td width="334"><a href="goods_xiangxi.jsp?id=<%=gcode %>">
              	<%=(String)rs1.getString("goodsstyle") %> -- 
              	<%=(String)rs1.getString("goodsname") %> --
              	<%=(String)rs1.getString("starprovince") %> -- 
              	<%=(String)rs1.getString("startcity") %> -- 
              	<%=(String)rs1.getString("endprovince") %> -- 
              	<%=(String)rs1.getString("endcity") %> --  

					</a></td>
            </tr>
            <%}
				} catch(Exception e){
            	e.printStackTrace();
            	}
            %>
            
			    <tr>
              <td width="36" height="25">&nbsp;</td>
              <td width="334" align="right"><a href="goods_select.jsp">&nbsp;>>>更多信息&nbsp;&nbsp;&nbsp;</a></td>
            </tr>
          </table>		  		  </td>
        </tr>
      </table>
      <table width="100" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td><img src="image/16.jpg" width="370" height="23"></td>
        </tr>
      </table>
      <table width="370" border="0" cellpadding="0" cellspacing="0" background="image/17.jpg">
<% sql = "SELECT `code`,trademark,brand,style,carload,"+

			"transpotstylle,username from tb_carmessage ORDER BY issuedate desc limit 8;"; 
			try{
	rs1 = connection.executeQuery(sql);
		while(rs1.next()){
			
		 code = rs1.getInt(1);%>
        <tr>
          <td width="36" height="25">&nbsp;</td>
          <td width="334"><a href="car_show.jsp?id=<%=code%>">
          <%=(String)rs1.getString("trademark") %> --  
          <%=(String)rs1.getString("brand") %> --  
          <%=(String)rs1.getString("style") %> --  
          <%=(String)rs1.getString("carload") %>吨 --  
          <%=(String)rs1.getString("transpotstylle") %> --  
          </a></td>
        </tr>
        <%
        }
		}catch(Exception e){
			e.printStackTrace();
		}%>
        <tr>
          <td width="36" height="25">&nbsp;</td>
          <td width="334" align="right"><a href="car_select.jsp">&nbsp;>>>更多信息&nbsp;&nbsp;&nbsp;</a></td>
        </tr>
      </table>
      <table width="100" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td><img src="image/18.jpg" width="370" height="29"></td>
        </tr>
      </table>
      <table width="370" border="0" cellpadding="0" cellspacing="0" background="image/19.jpg">
      <%sql = "select id,enterprisesort,enterprisename,operation,workarea,"+
      "address,username from tb_enterprise ORDER BY issuedate desc limit 8;";
      rs1 = connection.executeQuery(sql);
      while(rs1.next()){
    	  code = rs1.getInt(1);
      
      %>
        <tr>
          <td width="36" height="25">&nbsp;</td>
          <td width="334"><a href="enterprise_xiangxi.jsp?id=<%=code%>"> 
          	<%=rs1.getString("enterprisesort") %> -- 
          	<%=rs1.getString("enterprisename") %> -- 
          	<%=rs1.getString("operation") %> -- 
          	<%=rs1.getString("workarea") %> -- 
            </a>     </td>
        </tr>
        <tr>
        <%} %>
          <td width="36" height="25">&nbsp;</td>
          <td width="334" align="right"><a href="enterprise_select.jsp">&nbsp;>>>更多信息&nbsp;&nbsp;&nbsp;</a></td>
        </tr>
      </table></td><!--存放中间的代码-->
    <td valign="top" width="215" background="image/12.jpg"><jsp:include page="right.jsp" flush="true" /></td>
  </tr>
</table><jsp:include page="down.jsp" flush="true" />

</body>

</html>

